package seatiger.tomcat.coyote;

import seatiger.tomcat.catalina.Connector;

import java.util.concurrent.Executor;

/**
 * 可以根据不同的协议，或者不同的IO,选择合适的处理器
 */
public interface ProtocolHandler {

    void init() throws Exception;

    void start() throws Exception;

    void setPort(int port);

    void setExecutor(Executor executor);

    @Deprecated
    default void setConnector(Connector connector){};

    void destroy() throws Exception;

    /**
     * 用于获取连接对象
     */
    void setAdapter(Adapter adapter);
}
